using System.ComponentModel.DataAnnotations;

namespace UniversalAdmin.Application.DTOs;

public class ChangePasswordDto
{
  [Required(ErrorMessage = "原密码不能为空")]
  public string OldPassword { get; set; } = null!;

  [Required(ErrorMessage = "新密码不能为空")]
  [StringLength(100, MinimumLength = 6, ErrorMessage = "密码长度必须在6-100个字符之间")]
  public string NewPassword { get; set; } = null!;

  [Required(ErrorMessage = "确认密码不能为空")]
  [Compare("NewPassword", ErrorMessage = "两次输入的密码不一致")]
  public string ConfirmPassword { get; set; } = null!;
}